import request from '../../utils/request'

/**
 * 分页查询产品
 *
 * @param cstId
 * @param productName
 * @param status
 * @param page
 * @returns {Promise.<Object>}
 */
export async function queryProducts({ cstId, productName,productModel, suppilerName, status, page }) {
    return request(apiPath.zbtie + "/api/products", {
        method: 'GET',
        data: { cstId, productName, productModel, suppilerName, status, page: page.page, size: page.size }
    });
}

/**
 * 分页查询订单产品
 *
 * @param cstId
 * @param productName
 * @param status
 * @param page
 * @returns {Promise.<Object>}
 */
export async function queryOrderProducts({ orderIds, page }) {
    return request(apiPath.zbtie + "/api/order/products", {
        method: 'GET',
        data: { orderIds, page: page.page, size: page.size }
    });
}